﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<title>模板管理</title>
<style>
body{
	padding: 5px;
	margin: 0px;
	font-size: 12px;
}	
select
{
    border: 1px solid #ABADB3;
}
button
{
    margin: 0 5px;
    background: #F0F0F0;
    border: 1px solid;
    border-color: #FFFFFF #888888 #888888 #FFFFFF;
}
#container
{
    padding: 5px;
}
#templatePreview
{
    margin: 0 auto;
    padding: 5px;
    border: 1px solid #ABADB3;
    width: 470px;
    height: 220px;
    overflow: auto;
}
</style>
<script type="text/javascript" src="../../jquery/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
    $(function () {
        var preview = $('#templatePreview');
        $('#templateSelector').change(function () {
            var v = $(this).val();
            if (v) {
                preview.html('模板加载中...').load(v, function () { $('#insertTemplate').fadeIn(); });
            } else {
                preview.html('');
                $('#insertTemplate').hide();
            }
        });
        $('#insertTemplate').click(function () {
            callback(preview.html());
        });
    });
</script>
</head> 
<body>
<div id="container">选择模板：<select id="templateSelector"><option value="">请选择</option><option value="bszn.xml">办事指南模板</option></select><button id="insertTemplate" style="display:none;">确定插入模板</button><br /></div>
<div id="templatePreview"></div>
</body> 
</html>